/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package pruebas;

import java.util.Scanner;

/**
 *
 * @author ddpc
 */
public class empleado {
    Scanner teclado;
    float [] manana;
    float [] tarde;
    
    public void instmanempleado(){
        teclado = new Scanner(System.in);
        manana = new float[4];
        for (int i = 0; i < manana.length; i++) {
            System.out.println("inserta cobra "+i+" :");
            manana[i]= teclado.nextFloat();
        }
    }
    public void insttarempleado(){
        teclado = new Scanner(System.in);
        tarde = new float[4];
        for (int i = 0; i < tarde.length; i++) {
            System.out.println("inserta cobra"+i+":");
            tarde[i]= teclado.nextFloat();
        }
    }
    public void cobraemp(){
        float mana=0,tard=0;
        for (int i = 0; i < 4; i++) {
            mana = mana+manana[i];
            tard = tard+tarde[i];
        }
        System.out.println("el turno de mañana cobra: "+mana+" y el de tarde: "+tard);
    }
    public static void main(String[] args) {
        empleado x = new empleado();
        x.instmanempleado();
        x.insttarempleado();
        x.cobraemp();
    }
}
